From a64fd3693de71b700e9054004de84fbac15299c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Thu, 15 Dec 2016 17:39:50 +0100 Subject: [PATCH] babl-fish-path: permit searching for one step longer fish paths but only if no BABL_PATH_LENGTH long or shorter valid paths were found, this enables some desirable 16bit integer and floating point conversions. --- babl/babl-fish-path.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 7e1504c..4f169d0 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -333,6 +333,11 @@ babl_fish_path (const Babl *source, get_conversion_path (&pc, (Babl *) source, 0, max_path_length ()); + /* second attempt,. at path length + 1*/ + if (babl->fish_path.conversion_list->count == 0 && + max_path_length () + 1 <= BABL_HARD_MAX_PATH_LENGTH) + get_conversion_path (&pc, (Babl *) source, 0, max_path_length () + 1); + babl_in_fish_path--; babl_free (pc.current_path); } -- 2.30.2